//
//  InventViewController.m
//  tristana
//
//  Created by 李康 on 2021/1/5.
//  Copyright © 2021 李康. All rights reserved.
//

#import "InventViewController.h"
#import "Otherthings.h"
#import "TSToast.h"

@interface InventViewController ()

@end

@implementation InventViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"邀请好友";
    UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *leftImg = [UIImage imageNamed:@"loginBack"];
    leftBtn.frame = CGRectMake(0, 0, leftImg.size.width, leftImg.size.height);
    [leftBtn setImage:leftImg forState:UIControlStateNormal];
  
    [leftBtn addTarget:self action:@selector(leftBarAction:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
    self.navigationItem.leftBarButtonItem = leftItem;
    
}

- (IBAction)yaoqing:(id)sender {
    [TSToast toast:@"我们已经收到请求，稍后会发送短信进行邀请"];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.8 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self leftBarAction:nil];
    });
}

-(void)leftBarAction:(id)sender{
     [self.navigationController popViewControllerAnimated:YES];
}
@end
